package com.qiaofang.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class TradingStatusLogVO implements Comparable<TradingStatusLogVO> {

    @ApiModelProperty("渠道王实际状态变更记录")
    private String status;

    @ApiModelProperty("变更时间")
    private Date changeTime;

    @ApiModelProperty("V10同步状态记录")
    private Boolean syncResult;

    @ApiModelProperty("同步时间")
    private Date syncTime;

    @ApiModelProperty("备注原因")
    private String remark;

    @Override
    public int compareTo(TradingStatusLogVO o) {
        if (o == null || o.getChangeTime() == null) {
            return 1;
        }
        if (this == null || this.changeTime == null) {
            return -1;
        }
        return (int) (this.changeTime.getTime() - o.getChangeTime().getTime());
    }
}
